// import request from '@/utils/request1'

// export const login = ({adminname,password})=>{
//   return request({
//     url:'admin/login',
//     method:'POST',
//     data:{
//       adminname,
//       password
//     }
//   })
// }

import request from '@/utils/request'
// 创建/编辑用户
export function user_save(data) {
    return request({
        url: 'user/save',
        method: 'post',
        data
    })
}
//用户列表
export function user_list(query) {
    return request({
        url: 'user/list',
        method: 'get',
        params: query
    })
}
//删除用户信息
export function user_delete(data) {
    return request({
        url: 'user/delete',
        method: 'post',
        data
    })
}
// 创建/编辑设角色
export function role_save(data) {
    return request({
        url: 'role/save',
        method: 'post',
        data
    })
}
//角色列表
export function role_list(query) {
    return request({
        url: 'role/list',
        method: 'get',
        params: query
    })
}
//角色详情
export function role_info(query) {
    return request({
        url: 'role/info',
        method: 'get',
        params: query
    })
}
//删除角色
export function role_delete(data) {
    return request({
        url: 'role/delete',
        method: 'post',
        data
    })
}
// 创建/编辑参数
export function system_save(data) {
    return request({
        url: 'system/save',
        method: 'post',
        data
    })
}
//参数列表
export function system_list(query) {
    return request({
        url: 'system/list',
        method: 'get',
        params: query
    })
}
//删除参数
export function system_delete(data) {
    return request({
        url: 'system/delete',
        method: 'post',
        data
    })
}
//重置当前密码
export function user_reset(data) {
    return request({
        url: 'user/reset',
        method: 'post',
        data
    })
}
//用户设备列表
export function user_device_info(query) {
    return request({
        url: 'user-device/info',
        method: 'get',
        params: query
    })
}
//用户设备保存
export function user_device_save(data) {
    return request({
        url: 'user-device/save',
        method: 'post',
        data
    })
}

export function user_company_save(data) {
  return request({
      url: 'user/company/save',
      method: 'post',
      data
  })
}

export function user_company_info() {
  return request({
      url: 'user/company/info',
      method: 'get'
  })
}
